package com.geek.day01;

import java.util.Random;
import java.util.Scanner;

public class ArrayTest04 {
    public static void main(String[] args) {
        Random random=new Random();
        int[] arr=new int[5];
        Scanner s=new Scanner(System.in);
        System.out.println("请输入工号");
        for(int i=0;i< arr.length;i++){
            arr[i]=s.nextInt();
        }
        for (int i=0;i<arr.length;i++){
            int index= random.nextInt(5);
            int lingShi=arr[i];
            arr[i]=arr[index];
            arr[index]=lingShi;
        }
        System.out.println("打乱顺序");
        for (int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ");
        }

    }
}
